//
//  PersonalContentView.m
//  zhongjianProject
//
//  Created by Farben on 2020/4/16.
//  Copyright © 2020 Farben. All rights reserved.
//

#import "Header.h"
#import "PersonalContentView.h"


@interface PersonalContentView()




@end

@implementation PersonalContentView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

PersonalContentView *_view;

+(PersonalContentView *)instanceView
{
    NSArray* nibView =  [[NSBundle mainBundle] loadNibNamed:@"PersonalContentView" owner:self options:nil];
    return [nibView objectAtIndex:0];
}

-(PersonalContentView *)navBarView
{
    NSArray* nibView =  [[NSBundle mainBundle] loadNibNamed:@"PersonalContentView" owner:self options:nil];
    return [nibView objectAtIndex:1];
}

-(PersonalContentView *)searchBar
{
    NSArray* nibView =  [[NSBundle mainBundle] loadNibNamed:@"PersonalContentView" owner:self options:nil];
    return [nibView objectAtIndex:2];
}

-(PersonalContentView *)navBarBackView
{
    NSArray* nibView =  [[NSBundle mainBundle] loadNibNamed:@"PersonalContentView" owner:self options:nil];
    return [nibView objectAtIndex:3];
}



//@property(nonatomic,copy)void(^testBlock)(void);
//doSomethingWithComplete:(void(^)(void))completeBlock
-(void)createWithComplete:(void(^)(void))completeBlock{
    
    
    NSLog(@"nav -- self.leftButton -- %@",self.selfButton);
    self.selfButton.backgroundColor = [UIColor blackColor];
    [self.selfButton addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
    
    self.rightButton.backgroundColor = [UIColor blueColor];
    [self.rightButton addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
    
    self.clickBlock = completeBlock;
    
}


-(void)buttonClick:(UIButton*)sender{
    self.clickBlock();
}

-(void)createNavView{
    
}



@end
